package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_7_18S extends SkymobiProtocolMessage {
	int dealId;
	String msg = null;

	public Mmochat_7_18S() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_S_7_18);
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putInt(dealId);
		if (msg == null) {
			out.putShort((short) 0);
		} else {
			out.putPrefixedString(msg, 2);
		}
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public void setDealId(int dealId) {
		this.dealId = dealId;
	}

}
